<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/base.css">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        td{
            word-break: break-all;
        }
      
    </style>
</head>
<body>
    <nav class="navbar navbar-default nav-color" role="navigation">
        <div class="container-fluid">
          <div class="navbar-header">
            <a class="navbar-brand" href="#">后台管理</a>
          </div>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="/"><span class="glyphicon glyphicon-user"></span> 主页</a></li>
            <li><a href="/loginOut"><span class="glyphicon glyphicon-log-in"></span> 退出登录</a></li>
          </ul>
        </div>
      </nav>
    <div class="mycontainer"> 
        <!-- <a type="button" class="btn btn-success" href="/add">添加数据</a> -->
    
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <th class="td-one">编号</th>
                    <th class="td-two">姓名</th>
                    <th class="td-three">头像</th>
                    <th>背景</th>
                    <th>介绍</th>
                    <th>名言</th>
                    <th>网址</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {{each data}}
                <tr>
                    <td class="td-one">{{$index+1}}</td>
                    <td class="td-two">{{$value.name}}</td>
                    <td class="td-three">{{$value.avatar}}</td>
                    <td>{{$value.backgroundUrl}}</td>
                    <td>{{$value.description}}</td>
                    <td>{{$value.motto}}</td>
                    <td>{{$value.site}}</td>
                    <td>
                        <a type="button" class="btn btn-danger" href="doDelete?id={{@ $value._id}}">删除</a>
                        <a type="button" class="btn btn-warning" href="/edit?id={{@ $value._id}}">修改</a>

                    </td>
                </tr>
                {{/each}}
            </tbody>
        </table>
        <a type="button" class="btn btn-success" href="/add">添加数据</a>

    </div>
</body>
</html>